﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RBAC.Common.infrastructures.interfaces
{
    public interface IbaseRpository<T>where T : class,new()
    {


        /// <summary>
        /// 获取所有集合
        /// </summary>
        /// <returns></returns>
        IQueryable<T> Query();


        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>

        int Add(T entity);


        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="ietm"></param>
        /// <returns></returns>


        int update(T ietm);
        /// <summary>
        /// 批量修改
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>

        int Delete(List<T> t);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        int DeleteAll(int id );

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="item"></param>
        /// <returns></returns>
        int Deel(T item);




    }
}
